<template>
  <div>
    {{count}}
    <div>
      <button @click="addCount(1)">+1</button>
      <button @click="minusCount(1)">-1</button>
    </div>
    <div>
      <button @click="addCountAsync(1)">+1 async</button>
      <button @click="minusCountAsync(1)">-1 async</button>
    </div>
  </div>
</template>

<script>
/* eslint-disable */
import { mapState, mapMutations, mapActions } from 'vuex';

// import { createNamespacedHelpers } from 'vuex'
// const { mapState, mapMutations, mapActions } = createNamespacedHelpers('module2')


export default {
  computed: {
    ...mapState('module2', ['count']),
    // ...mapState(['count']) 
  },
  methods: {
    ...mapMutations('module2', ['addCount', 'minusCount']),
    // ...mapMutations(['addCount', 'minusCount']),
    ...mapActions('module2', ['addCountAsync', 'minusCountAsync'])
    // ...mapActions(['addCountAsync', 'minusCountAsync'])
  }
}
</script>

<style>

</style>